router: sample.o rdwrthread.o rdwrthread_if2.o icmpthread.o sniffex.o sniffex2.o
	g++ -o router sample.o rdwrthread.o rdwrthread_if2.o icmpthread.o sniffex.o sniffex2.o -lpthread -lpcap

sample.o: sample.cpp definitions.hpp
	g++ -g -c -Wall sample.cpp

rdwrthread.o: rdwrthread.cpp definitions.hpp
	g++ -g -c -Wall rdwrthread.cpp

rdwrthread_if2.o: rdwrthread_if2.cpp definitions.hpp
	g++ -g -c -Wall rdwrthread_if2.cpp

icmpthread.o: icmpthread.cpp definitions.hpp
	g++ -g -c -Wall icmpthread.cpp

sniffex.o: sniffex.cpp definitions.hpp
	g++ -g -c -Wall sniffex.cpp

sniffex2.o: sniffex2.cpp definitions.hpp
	g++ -g -c -Wall sniffex2.cpp

clean:
	rm -f *.o *.bak router

